From: Lars Magne Ingebrigtsen Date: Mon, 14 Nov 2011 16:09:13 +0000 (+0100) Subject: If the server hangs up while we're talking to it, just `message' the error instead... X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~1676 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4c59f0119fb1ce739b34f652641ced917c7984d3;p=emacs.git If the server hangs up while we're talking to it, just `message' the error instead of throwing an error. --- diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index a2a1b451258..5eb22bb8614 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,9 @@ +2011-11-14 Lars Magne Ingebrigtsen + + * url-http.el (url-http-async-sentinel): If the server hangs up + while we're talking to it, just `message' the error instead of + throwing an error. + 2011-11-03 Lars Magne Ingebrigtsen * url-cookie.el (url-cookie-expired-p): Protect against diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 6e192cd5aae..e9da4a1010c 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1255,7 +1255,11 @@ CBARGS as the arguments." (url-http-end-of-document-sentinel proc why)) ((string= (substring why 0 4) "open") (setq url-http-connection-opened t) - (process-send-string proc (url-http-create-request))) + (condition-case error + (process-send-string proc (url-http-create-request)) + (file-error + (setq url-http-connection-opened nil) + (message "HTTP error: %s" error)))) (t (setf (car url-callback-arguments) (nconc (list :error (list 'error 'connection-failed why